package naga.x.net.impl.pomelo;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializeFilter;

import naga.x.net.Packet;
import naga.x.net.impl.pomelo.protocol.Package;

public abstract class PomeloPacket extends Packet {

	@JSONField(serialize = false)
	protected int serial;
	@JSONField(serialize = false)
	protected int packageType;

	public PomeloPacket() {
		this(-1);
	}
	
	public PomeloPacket(int serial) {
		this(serial, Package.TYPE_DATA);
	}
	
	public PomeloPacket(int serial, int packageType) {
		this.serial = serial;
		this.packageType = packageType;
	}
	
	public int getSerial() {
		return serial;
	}

	public void setSerial(int serial) {
		this.serial = serial;
	}

	public int getPackageType() {
		return packageType;
	}

	public void setPackageType(int packageType) {
		this.packageType = packageType;
	}
	
	@JSONField(serialize = false)
	public SerializeFilter[] getJsonSerializeFilters() {
		return null;
	}
	
}
